<?php
	require("./conn.php");
	$title = $_POST['title'];
	$contect = $_POST['contect'];
	date_default_timezone_set(PRC);//解决时间函数时差问题
	$time = date("Y-m-d");
	$sql = "insert into app_contect(title,contect,create_time)values('$title','$contect','$time')";
	$result = mysql_query($sql);
	if($result){
		setcookie("status", "login");
		header("Location:index.php?contect=发布成功");
	}else{
		setcookie("status", "no");
		header("Location:index.php?contect=操作失败");
	}
?>